Skip to content

Conversation

arcanis
Copy link

@arcanis arcanis commented Sep 30, 2018

The Buffer constructor is deprecated for security reason; Node recommends using Buffer.from() instead in such situations. Until it's fixed, it'll print annoying warning messages.

@goto-bus-stop
Copy link
Member

Thanks! It would be nice if we could still support very old environments that don't have Buffer.from (browserify itself works all the way back to Node 0.8! maybe even 0.6, but CI doesn't 100% support that anymore, so I'm not sure…)

Perhaps we can do (Buffer.from||Buffer)( instead, and add a test that does delete Buffer.from; fs.readFileSync(...)? I think that should work for new and old Nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants